package com.alvin.mbp.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.alvin.mbp.dao.BaseDao;
import com.alvin.mbp.entity.PointMember;

@Service
@Transactional
public class PointMemberService extends BaseService<PointMember> {

	@Override
	@Resource(name = "pointMemberDao")
	public void setBaseDao(BaseDao<PointMember> baseDao) {
		this.baseDao = baseDao;
	}

	public PointMember changePwd(Integer mid, String newPwd) {
		this.updateByID(mid, "password", newPwd);
		PointMember member = this.findById(mid);
		return member;
	}

}
